package com.yugao.fintech.antelope.member.controller.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yugao.fintech.antelope.member.model.rqrs.account_detail.AccountDetailPageReq;
import com.yugao.fintech.antelope.member.model.rqrs.account_detail.AccountDetailResp;
import com.yugao.fintech.antelope.member.service.AccountDetailService;
import com.yugao.fintech.antelope.base.ram.ActionType;
import com.yugao.fintech.antelope.base.ram.RamResource;
import com.yugao.fintech.framework.core.response.Resp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "账户明细")
@RestController
@RequestMapping("/accountDetail")
public class AccountDetailController {
    @Autowired
    private AccountDetailService accountDetailService;

    @ApiOperation(value = "分页账户明细")
    @GetMapping("/page")
    @RamResource(action = "member:accountDetail:query", name = "查询账户明细", type = ActionType.READ)
    public Resp<IPage<AccountDetailResp>> pageAccountDetail(@Validated AccountDetailPageReq req) {
        return Resp.ok(accountDetailService.pageAccountDetail(req));
    }
}
